package cn.net.dpi.shp.model.entity;

import cn.net.dpi.shp.handler.LineStringTypeHandler;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.locationtech.jts.geom.LineString;

import java.io.Serializable;

/**
 * @TableName bxf_lan
 */
@TableName(value = "bxf_lan")
@Data
public class BxfLan implements Serializable {
    /**
     *
     */
    @TableId
    private Integer fid;

    /**
     *
     */
    @TableField(typeHandler = LineStringTypeHandler.class)
    private LineString theGeom;

    /**
     *
     */
    private Long id;

    /**
     *
     */
    private Long chaid;

    /**
     *
     */
    private Long lanenum;

    /**
     *
     */
    private Long seqnr;

    /**
     *
     */
    private Long diroftraff;

    /**
     *
     */
    private Long speedlimit;

    /**
     *
     */
    private Long speedlimit1;

    /**
     *
     */
    private Double width;

    /**
     *
     */
    private Long vehiclesim;

    /**
     *
     */
    private Long lanetype;

    /**
     *
     */
    private Long lanestatus;

    /**
     *
     */
    private Long formingdes;

    /**
     *
     */
    private Double length;

    /**
     *
     */
    private Long app;

    /**
     *
     */
    private Long posRescon;

    /**
     *
     */
    private Long negRescon;

    /**
     *
     */
    private Long planDir;

    /**
     *
     */
    private Long currentDi;

    /**
     *
     */
    private Long inbuilding;

    private Long fileId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BxfLan other = (BxfLan) that;
        return (this.getFid() == null ? other.getFid() == null : this.getFid().equals(other.getFid()))
                && (this.getTheGeom() == null ? other.getTheGeom() == null : this.getTheGeom().equals(other.getTheGeom()))
                && (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getChaid() == null ? other.getChaid() == null : this.getChaid().equals(other.getChaid()))
                && (this.getLanenum() == null ? other.getLanenum() == null : this.getLanenum().equals(other.getLanenum()))
                && (this.getSeqnr() == null ? other.getSeqnr() == null : this.getSeqnr().equals(other.getSeqnr()))
                && (this.getDiroftraff() == null ? other.getDiroftraff() == null : this.getDiroftraff().equals(other.getDiroftraff()))
                && (this.getSpeedlimit() == null ? other.getSpeedlimit() == null : this.getSpeedlimit().equals(other.getSpeedlimit()))
                && (this.getSpeedlimit1() == null ? other.getSpeedlimit1() == null : this.getSpeedlimit1().equals(other.getSpeedlimit1()))
                && (this.getWidth() == null ? other.getWidth() == null : this.getWidth().equals(other.getWidth()))
                && (this.getVehiclesim() == null ? other.getVehiclesim() == null : this.getVehiclesim().equals(other.getVehiclesim()))
                && (this.getLanetype() == null ? other.getLanetype() == null : this.getLanetype().equals(other.getLanetype()))
                && (this.getLanestatus() == null ? other.getLanestatus() == null : this.getLanestatus().equals(other.getLanestatus()))
                && (this.getFormingdes() == null ? other.getFormingdes() == null : this.getFormingdes().equals(other.getFormingdes()))
                && (this.getLength() == null ? other.getLength() == null : this.getLength().equals(other.getLength()))
                && (this.getApp() == null ? other.getApp() == null : this.getApp().equals(other.getApp()))
                && (this.getPosRescon() == null ? other.getPosRescon() == null : this.getPosRescon().equals(other.getPosRescon()))
                && (this.getNegRescon() == null ? other.getNegRescon() == null : this.getNegRescon().equals(other.getNegRescon()))
                && (this.getPlanDir() == null ? other.getPlanDir() == null : this.getPlanDir().equals(other.getPlanDir()))
                && (this.getCurrentDi() == null ? other.getCurrentDi() == null : this.getCurrentDi().equals(other.getCurrentDi()))
                && (this.getInbuilding() == null ? other.getInbuilding() == null : this.getInbuilding().equals(other.getInbuilding()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFid() == null) ? 0 : getFid().hashCode());
        result = prime * result + ((getTheGeom() == null) ? 0 : getTheGeom().hashCode());
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getChaid() == null) ? 0 : getChaid().hashCode());
        result = prime * result + ((getLanenum() == null) ? 0 : getLanenum().hashCode());
        result = prime * result + ((getSeqnr() == null) ? 0 : getSeqnr().hashCode());
        result = prime * result + ((getDiroftraff() == null) ? 0 : getDiroftraff().hashCode());
        result = prime * result + ((getSpeedlimit() == null) ? 0 : getSpeedlimit().hashCode());
        result = prime * result + ((getSpeedlimit1() == null) ? 0 : getSpeedlimit1().hashCode());
        result = prime * result + ((getWidth() == null) ? 0 : getWidth().hashCode());
        result = prime * result + ((getVehiclesim() == null) ? 0 : getVehiclesim().hashCode());
        result = prime * result + ((getLanetype() == null) ? 0 : getLanetype().hashCode());
        result = prime * result + ((getLanestatus() == null) ? 0 : getLanestatus().hashCode());
        result = prime * result + ((getFormingdes() == null) ? 0 : getFormingdes().hashCode());
        result = prime * result + ((getLength() == null) ? 0 : getLength().hashCode());
        result = prime * result + ((getApp() == null) ? 0 : getApp().hashCode());
        result = prime * result + ((getPosRescon() == null) ? 0 : getPosRescon().hashCode());
        result = prime * result + ((getNegRescon() == null) ? 0 : getNegRescon().hashCode());
        result = prime * result + ((getPlanDir() == null) ? 0 : getPlanDir().hashCode());
        result = prime * result + ((getCurrentDi() == null) ? 0 : getCurrentDi().hashCode());
        result = prime * result + ((getInbuilding() == null) ? 0 : getInbuilding().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", fid=").append(fid);
        sb.append(", theGeom=").append(theGeom);
        sb.append(", id=").append(id);
        sb.append(", chaid=").append(chaid);
        sb.append(", lanenum=").append(lanenum);
        sb.append(", seqnr=").append(seqnr);
        sb.append(", diroftraff=").append(diroftraff);
        sb.append(", speedlimit=").append(speedlimit);
        sb.append(", speedlimit1=").append(speedlimit1);
        sb.append(", width=").append(width);
        sb.append(", vehiclesim=").append(vehiclesim);
        sb.append(", lanetype=").append(lanetype);
        sb.append(", lanestatus=").append(lanestatus);
        sb.append(", formingdes=").append(formingdes);
        sb.append(", length=").append(length);
        sb.append(", app=").append(app);
        sb.append(", posRescon=").append(posRescon);
        sb.append(", negRescon=").append(negRescon);
        sb.append(", planDir=").append(planDir);
        sb.append(", currentDi=").append(currentDi);
        sb.append(", inbuilding=").append(inbuilding);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}